package com.schoolCommunity.entity;

import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author YTH
 * @since 2020-10-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MailboxMember implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 邮箱系统ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 邮箱主题
     */
    private String title;

    /**
     * 邮箱主题内容
     */
    private String text;

    /**
     * 送达状态，0为未送达，1送达
     */
    @TableField("isGet")
    private Integer isGet;

    /**
     * 发送人ID
     */
    private Long sendAdminId;

    /**
     * 发送人昵称
     */
    private String sendAdminNickname;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 逻辑删除，0未删除，1已删除
     */
    @TableLogic
    private Integer deleted;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;

    /**
     * 指向上次修改的ID
     */
    private Long lastVersion;

    /**
     * 接收人ID
     */
    private Long getMemberId;

    /**
     * 接收人昵称
     */
    private String getMemberNickname;

    /**
     * 接收时间
     */
    @TableField("getTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date getTime;

    /**
     * 发送时间
     */
    @TableField("sendTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;


}
